<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="viewport"
        content="initial-scale=1, width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>首页-外汇</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"> </script>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/media.css">
</head>

<body>
    <header class="hidden-xs">
        <div class="container">
            <div class="logo"><a href="index.html"><img src="img/logo.png" alt=""></a><span>雷达在手，汇市无忧</span></div>
            <div class="search">
                <div class="input-group">
                    <input type="text" class="form-control" id="sInput" placeholder="Search for...">
                    <span class="input-group-btn">
                        <button class="btn btn-primary" type="button" id="searchAll">搜索</button>
                    </span>
                </div>
                <span class="tit">热门分类：</span>
            </div>
            <div class="login">
                <div class="logined" style="display: none;">
                    <span class="login-name">姿态丶</span>
                    <span class="glyphicon glyphicon-menu-down"></span>
                    <div href="#" class="con">
                        <li><a href="#">会员中心</a></li>
                        <li><a href="#">个人信息</a></li>
                        <li><a href="javaScript:;" id="quit">退出</a></li>
                    </div>
                </div>
                <span class="login-before">
                    <a href="login.html"><span>登陆</span></a>
                    <a href="reg.html"><span>注册</span></a>
                </span>
            </div>
        </div>
    </header>
    <nav class="hidden-xs">
        <div class="container">
            <nav class="navbar navbar-default">
                <div class="container-fluid">
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <div class="input-group hidden-lg hidden-md hidden-sm">
                            <span class="input-group-addon glyphicon glyphicon-search" id="basic-addon1"></span>
                            <input type="text" class="form-control" placeholder="搜索" aria-describedby="basic-addon1">
                        </div>
                        <ul class="nav navbar-nav">
                            <li class="active"><a href="index.html">首页 <span class="sr-only">(current)</span></a></li>
                            <li><a href="plats.html">平台商</a></li>
                            <li><a href="industry.html">行业雷达</a></li>
                            <li><a href="market.html">市场雷达</a></li>
                            <li><a href="activity.html">行业活动</a></li>
                            <li><a href="square.html">雷达广场</a></li>
                        </ul>
                    </div><!-- /.navbar-collapse -->
                </div><!-- /.container-fluid -->
            </nav>
        </div>
    </nav>
    <div class="m-header hidden-lg hidden-md hidden-sm">
        <div class="nav-left">
            <div class="btn-burger navbar-toggle collapsed" data-toggle="collapse"
                data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </div>
        </div>
        <div class="wrapper___2_acE"></div>
        <!-- <div class="user-dropmenu-mask"></div> -->
        <div class="user-dropmenu" style="height:0px;opacity: 1;top: 50px;">
            <div class="search">
                <div class="input-group">
                    <span class="input-group-addon glyphicon glyphicon-search" id="basic-addon1"></span>
                    <input type="text" class="form-control" placeholder="搜索" aria-describedby="basic-addon1">
                </div>
            </div>
            <ul class="ant-menu">
                <li>
                    <div class="ant-menu-submenu-title">工作台</div>
                    <ul class="ant-menu-inline">
                        <li class="ant-menu-item"><a href="index.html" class="active">首页</a></li>
                        <li class="ant-menu-item"><a href="plats.html" class="">平台商</a></li>
                        <li class="ant-menu-item"><a href="industry.html" class="">行业雷达</a></li>
                        <li class="ant-menu-item"><a href="market.html" class="">市场雷达</a></li>
                        <li class="ant-menu-item"><a href="index.html" class="">行业活动</a></li>
                        <li class="ant-menu-item"><a href="index.html" class="">雷达广场</a></li>
                    </ul>
                </li>
                <li class="ant-menu-item"><a href="#" style="background: #fff;">帮助</a></li>
                <li class="ant-menu-item"><a href="#" style="background: #fff;">发现</a></li>
            </ul>
            <ul class="ant-menu">
                <li class="ant-menu-item"><a href="#" style="background: #fff;">个人页面</a></li>
                <li class="ant-menu-item"><a href="#" style="background: #fff;">退出</a></li>
            </ul>
        </div>
    </div>
    <!-- -------------------主体----------------- -->
    <section class="page">
        <section class="page1">
            <div class="container">
                <div class="banner">
                    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                        <!-- Indicators -->
                        <ol class="carousel-indicators" id="indicators">
                        </ol>
                        <!-- Wrapper for slides -->
                        <div class="carousel-inner" role="listbox" id="listbox">
                        </div>
                    </div>
                </div>
                <div class="right-list hidden-xs hidden-sm">
                    <a href="#"><img class="img-responsive" src="./img/right-list.png" alt=""></a>
                    <a href="#"><img class="img-responsive" src="./img/right-list.png" alt=""></a>
                    <a href="#"><img class="img-responsive" src="./img/right-list.png" alt=""></a>
                </div>
                <div class="user hidden-xs hidden-sm">
                    <div class="user-info">
                        <div class="user-img"><img class="img-responsive" src="./img/nouser.png" alt=""></div>
                        <div class="user-tip">Hi!&nbsp;您好</div>
                        <div class="user-btn">
                            <a href="login.html" class="btn user-login">登&nbsp;陆</a>
                            <a href="reg.html" class="user-reg btn">注&nbsp;册</a>
                        </div>
                    </div>
                    <div class="small-nav">
                        <div class="item">
                            <a href="hot-plat.html">
                                <span><img src="img/user-icon01.png" alt=""></span>
                                <p>监督机构</p>
                            </a>
                        </div>
                        <div class="item">
                            <a href="hot-plat.html">
                                <span><img src="img/user-icon02.png" alt=""></span>
                                <p>热门平台</p>
                            </a>
                        </div>
                        <div class="item">
                            <a href="hot-plat.html">
                                <span><img src="img/user-icon03.png" alt=""></span>
                                <p>平台排行</p>
                            </a>
                        </div>
                        <div class="item">
                            <a href="hot-plat.html">
                                <span><img src="img/user-icon04.png" alt=""></span>
                                <p>黑平台</p>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <section class="page2">
            <div class="container">
                <div class="hot">
                    <div class="head">
                        <span class="tit">热门平台</span>
                        <span class="des">收录数据：平台商家：<span class="num01">99&nbsp;</span>家 &nbsp;&nbsp;监管国：<span
                                class="num02">20&nbsp;</span>个</span>
                        <span class="more hidden-xs"><a href="hot-plat.html"> 更多<i
                                    class="glyphicon glyphicon-menu-right"></i></a></span>
                    </div>
                    <div class="content clearfix" id="hot-plat">
                    </div>
                </div>
            </div>
        </section>
        <section class="page3">
            <div class="container">
                <div class="row">
                    <div class="col-md-8 col-sm-12 col-xs-12">
                        <div class="page3-left">
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs" role="tablist" id="industry-nav">
                                <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab"
                                        data-toggle="tab" data-id="1">行业雷达</a></li>
                                <li role="presentation"><a href="#home" role="tab" data-toggle="tab"
                                        data-id="2">市场雷达</a></li>
                                <li role="presentation"><a href="#home" role="tab" data-toggle="tab"
                                        data-id="3">行业活动</a></li>
                                <li role="presentation"><a href="#home" role="tab" data-toggle="tab"
                                        data-id="4">雷达广场</a></li>
                            </ul>
                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="home">
                                </div>
                                <button id="moreBtn" class="btn btn-primary center-block hidden-xs">加载更多</button>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4 col-sm-12 col-xs-12 pl0">
                        <div class="page3-right">
                            <!-- Nav tabs -->
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation" class="active"><a href="#home1" aria-controls="home1" role="tab"
                                        data-toggle="tab">热门平台</a></li>
                                <li role="presentation"><a href="#profile1" aria-controls="profile1" role="tab"
                                        data-toggle="tab">平台排行</a></li>
                                <li role="presentation"><a href="#messages1" aria-controls="messages1" role="tab"
                                        data-toggle="tab">黑平台</a></li>
                            </ul>
                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="home1">
                                </div>
                                <!-- 平台排行 -->
                                <div role="tabpanel" class="tab-pane" id="profile1">
                                </div>
                                <!-- 黑平台 -->
                                <div role="tabpanel" class="tab-pane" id="messages1">
                                </div>
                            </div>
                        </div>
                        <div class="page3-bottom">
                            <!-- Nav tabs -->
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation" class="active"><a href="#home2" aria-controls="home2" role="tab"
                                        data-toggle="tab">行业活动</a></li>
                            </ul>
                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="home2">
                                    <ul>
                                        <li class="item ">
                                            <div class="item-son clearfix">
                                                <a href="#">
                                                    <img src="img/page3-bottomimg.png" alt="">
                                                    <div class="txt">
                                                        <p class="tit">高端航材核心供应商</p>
                                                        <div class="date-group">
                                                            <span class="year">2019-07-26</span>
                                                            <span class="hour">18:00:00</span>
                                                        </div>
                                                        <span class="area">地点</span>
                                                    </div>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="item clearfix">
                                            <div class="item-son clearfix">
                                                <a href="#">
                                                    <img src="img/page3-bottomimg.png" alt="">
                                                    <div class="txt">
                                                        <p class="tit">高端航材核心供应商</p>
                                                        <div class="date-group">
                                                            <span class="year">2019-07-26</span>
                                                            <span class="hour">18:00:00</span>
                                                        </div>
                                                        <span class="area">地点</span>
                                                    </div>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="item clearfix">
                                            <div class="item-son clearfix">
                                                <a href="#">
                                                    <img src="img/page3-bottomimg.png" alt="">
                                                    <div class="txt">
                                                        <p class="tit">高端航材核心供应商</p>
                                                        <div class="date-group">
                                                            <span class="year">2019-07-26</span>
                                                            <span class="hour">18:00:00</span>
                                                        </div>
                                                        <span class="area">地点</span>
                                                    </div>
                                                </a>
                                            </div>
                                        </li>
                                        <li class="item clearfix">
                                            <div class="item-son clearfix">
                                                <a href="#">
                                                    <img src="img/page3-bottomimg.png" alt="">
                                                    <div class="txt">
                                                        <p class="tit">高端航材核心供应商</p>
                                                        <div class="date-group">
                                                            <span class="year">2019-07-26</span>
                                                            <span class="hour">18:00:00</span>
                                                        </div>
                                                        <span class="area">地点</span>
                                                    </div>
                                                </a>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </section>
    <div id="footer"></div>
</body>
<script src="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/core.js"></script>
<script src="js/mine.js"></script>
<script>
    $(function () {
        $("#footer").load("./footer.html")
        // $("#header").load("./public/header.html")
        // 置顶数据 <li data-target="#carousel-example-generic" data-slide-to="1">indicators</li> indicators
        
        Getdata(getFirstTopList,{}).then(res => {
            console.log(res)
            let topItem = '';
            let liDot = ''; //点数
            $.each(res.data, function (index, val) {
                topItem += `<div class="item"><a href="detail.html?id=${val.id}">
                    <img src="${val.newsPath}" alt="...">
                    <p class="news-tit">${val.title}</p>
                    </a></div>`;
                liDot += `<li data-target="#carousel-example-generic" data-slide-to="${index}"></li>`;
            })
            $("#listbox").html(topItem);
            $("#indicators").html(liDot);
            $("#listbox div").first().addClass("active");
            $("#indicators li").first().addClass("active");
        })



        // 获取监控国家和平台商总数
        Getdata(getMerSupCount,{}).then(res => {
            console.log(res)
            // 商家 num01 监管国 num02 supCount merCount
            $(".head .num01").html(res.data.merCount);
            $(".head .num02").html(res.data.supCount);
        })





        // 热门平台
        Getdata(busList,{type: 2,size: 20,current: 1}).then(res => {
            console.log(res)
            let item = "";

            $.each(res.data.records, function (index, val) {
                item += `<div class="item">
                            <img src="${val.imgPath}" class="img-responsive" alt="">
                            <div class="mask"><a href="platDetail.html?id=${val.id}">${val.name}</a></div>
                        </div>`;
            })
            $("#hot-plat").html(item);



        })
        // 侧栏热门平台
        Getdata(busList, { type: 2, size: 10, current: 1 }).then(res => {
            let itemList = '';
            $.each(res.data.records, function (index, val) {
                itemList += `<div class="item clearfix">
                                        <div class="img"><img src="${val.imgPath}" alt=""><span class="jg">监管中</span></div>
                                        <div class="txt">
                                            <a href="platDetail.html?id=${val.id}">
                                                <p class="tit">${val.name}</p>
                                            </a>
                                            <span class="span-group"><span class="s1">雷达评分</span><span class="s2">${val.radarScore}</span></span>
                                            <div class="label-group"><span>澳大利亚</span> | <span>5国监管</span> | <span>全牌照</span></div>
                                        </div>
                                    </div>`;
            })
            $("#home1").html(itemList);
        })


        // 黑平台
        Getdata(busList, {
            type: 3, //商户类型（  1正常商户 2热门商户 3黑商户 -1查全部）messages1
            size: 10, //每页条数
            current: 1 //页码
        }).then(res => {
            console.log(res)
            let blackList = '';
            $.each(res.data.records, function (index, val) {
                blackList += `<div class="item clearfix">
                                        <div class="img"><img src="${val.imgPath}" alt=""><span class="jg">监管中</span></div>
                                        <div class="txt">
                                            <a href="platDetail.html?id=${val.id}">
                                                <p class="tit">${val.name}</p>
                                            </a>
                                            <span class="span-group"><span class="s1">雷达评分</span><span class="s2">${val.radarScore}</span></span>
                                            <div class="label-group"><span>澳大利亚</span> | <span>5国监管</span> | <span>全牌照</span></div>
                                        </div>
                                    </div>`

            })
            $("#messages1").html(blackList);
        })

        // 平台排行profile1
        Getdata(getListBySort, { current: 1, size: 10 })
            .then(res => {
                let profile1Item = "";
                console.log(res)
                $.each(res.data.records, function (index, val) {
                    profile1Item += `<div class="item clearfix">
                                        <div class="img"><img src="${val.imgPath}" alt=""><span class="jg">监管中</span></div>
                                        <div class="txt">
                                            <a href="platDetail.html?id=${val.id}">
                                                <p class="tit">${val.name}</p>
                                            </a>
                                            <span class="span-group"><span class="s1">雷达评分</span><span class="s2">${val.radarScore}</span></span>
                                            <div class="label-group"><span>澳大利亚</span> | <span>5国监管</span> | <span>全牌照</span></div>
                                        </div>
                                        <span class="top">${index + 1}</span>
                                    </div>`;
                })
                $("#profile1").html(profile1Item);
            })


        // 行业雷达
        let firstCategoryId = $("#industry-nav li").first().children().data("id");
        Getdata(columnList, {//置顶侧栏
            categoryId: firstCategoryId, //二级类别id
            size: 3, //列表长度
            current: 1, //页码
            level: 1, //1代表查询改一级类别下的全部资讯 2代表查询该二级类别资讯
        }).then( res=>{
            
        })
        // 行业雷达
        Getdata(columnList, {
            categoryId: firstCategoryId, //二级类别id
            size: 10, //列表长度
            current: 1, //页码
            level: 1, //1代表查询改一级类别下的全部资讯 2代表查询该二级类别资讯
        }).then(res => {
            let size = 10;
            console.log(res)
            var item = "";
            $.each(res.data.records, function (index, val) {
                item += `<div class="item clearfix">
                                        <div class="img"><img src="${val.newsPath}" alt=""></div>
                                        <div class="des">
                                            <a href="detail.html?id=${val.id}">
                                                <p class="tit">${val.title}</p>
                                            </a>
                                            <p class="tit-des">${val.summary}</p>
                                            <div class="btn-group">
                                                <a href="detail.html?id=${val.id}" class="btn">${val.popularTags}</a>
                                            </div>
                                            <div class="date"><span class="eyes${val.browseNumShow}"><i class="glyphicon glyphicon-eye-open"></i></span> <i class="glyphicon glyphicon-time"></i><span class="year">${val.gmtDatetime}</span></div>
                                        </div>
                                    </div>`;

            })
            $("#home").html(item);


        })


        // 点击时切换分类列表
        $.each($("#industry-nav li"), function (index, val) {
            //获取所有的栏目的id
            let categoryId = $("#industry-nav li").eq(index).children().data("id");
            $("#industry-nav li").eq(index).click(function () {
                let size = 10;
                Getdata(columnList, {
                    categoryId, //二级栏目的id
                    size, //列表长度
                    current: 1, //页码
                    level: 1
                }).then(res => {
                    console.log(res)
                    var item = "";
                    $.each(res.data.records, function (index, val) {
                        item += `<div class="item clearfix">
                                        <div class="img"><img src="${val.newsPath}" alt=""></div>
                                        <div class="des">
                                            <a href="detail.html?id=${val.id}">
                                                <p class="tit">${val.title}</p>
                                            </a>
                                            <p class="tit-des">${val.summary}</p>
                                            <div class="btn-group">
                                                <a href="detail.html?id=${val.id}" class="btn">${val.popularTags}</a>
                                            </div>
                                            <div class="date"><span class="eyes${val.browseNumShow}"><i class="glyphicon glyphicon-eye-open"></i>${val.browseNum}</span><i class="glyphicon glyphicon-time"></i><span class="year">${val.gmtDatetime}</span></div>
                                        </div>
                                    </div>`;
                    })
                    $("#home").html(item);
                })
            })




        })
        // 点击加载更多
        let size1 = 10;
        let categoryId = "";
        $("#moreBtn").click(function () {
            if (categoryId != "" && categoryId != $("#industry-nav .active").children().data("id")) {
                size1 = 10;
            }
            size1 += 10;
            categoryId = $("#industry-nav .active").children().data("id");
            Getdata(columnList, { categoryId, size: size1, current: 1, level: 1 }).then(res => {
                let item = '';
                console.log(res)
                $.each(res.data.records, function(index, val){
                    item += `<div class="item clearfix">
                                        <div class="img"><img src="${val.newsPath}" alt=""></div>
                                        <div class="des">
                                            <a href="detail.html?id=${val.id}">
                                                <p class="tit">${val.title}</p>
                                            </a>
                                            <p class="tit-des">${val.summary}</p>
                                            <div class="btn-group">
                                                <a href="detail.html?id=${val.id}" class="btn">${val.popularTags}</a>
                                            </div>
                                            <div class="date"><span class="eyes${val.browseNumShow}"><i class="glyphicon glyphicon-eye-open"></i></span> <i class="glyphicon glyphicon-time"></i><span class="year">${val.gmtDatetime}</span></div>
                                        </div>
                                    </div>`;

                })
                $("#home").html(item);
            })
        })
    










    })
</script>

</html>